﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Collections.ObjectModel;
using System.Xml;

namespace KELT.KELTObjects.ViewportObjectModel
{
    
    public class GroupObject : ViewportObj
    {
        public GroupObject()
        {
            ObjectInfo = "TextObject";
            m_ObjectList = new ObservableCollection<ViewportObj>();
            m_IsExpanded = false;
            parentObject = null;
        }

        private readonly ObservableCollection<ViewportObj> m_ObjectList;
        public ObservableCollection<ViewportObj> ObjectList
        {
            get { return m_ObjectList; }
        }

        public void addObject(ViewportObj obj)
        {
            m_ObjectList.Add(obj);
            obj.parentObject = this;
            ObjectInfo = "GroupObject";

        }

        private bool m_IsExpanded;
        public bool IsExpanded
        {
            get
            {
                return m_IsExpanded;
            }
            set
            {
                m_IsExpanded = value;
            }
        }

        #region XML
        public override void GetObjInfoXML(XmlWriter writer)
        {
            writer.WriteStartElement("GroupObject");
            {
                //writer.WriteElementString("fileSource", );
            }
            writer.WriteEndElement();
        }
        #endregion
    }
}
